home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6198 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: news.interlog.com!news
  2. From: object@interlog.com (Nicholas Scott)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Pure Virtual Destructor Question
  5. Date: Sat, 10 Feb 1996 16:30:03 GMT
  6. Organization: The Object Group
  7. Message-ID: <311cc66a.2683598@news.interlog.com>
  8. References: <4fecq0$k4e@news4.digex.net> <4fg2s5$r02@cnn.exu.ericsson.se> <4fgp0o$759@news4.digex.net>
  9. NNTP-Posting-Host: object.interlog.com
  10. X-Newsreader: Forte Agent .99d/32.182
  11.  
  12. ell@access1.digex.net (Ell) wrote:
  13.  
  14. >Mickey Williams 66753 (ebumow@ebu.ericsson.com) wrote:
  15. >: In article k4e@news4.digex.net,  ell@access4.digex.net (Ell) writes:
  16. >: 
  17. >: >Immediately above you are logically "defining" your "pure virtual" 
  18. >: >destructor "inside the class where it is "declared" as a pure virtual
  19. >: >function.  It is _illegal_ to logically, or physically "define" a pure
  20. >: >virtual function in the class it is "declared" in.  A pure virtual should
  21.  
  22. Nonsense... implementations can be supplied for pure virtuals...
  23. further they can also be invoked.
  24.  
  25. >: >only be defined in classes derived from the class where the pure virtual
  26. >: >is declared.  Only derived classes should "do some destructor stuff".
  27.  
  28. This last sentence is also false. Virtual destructors result in
  29. chained calls to all dtors.
  30.  
  31. >: This is not true in the case of pure virtual destructors. You must
  32. >: always provide a function body for a virtual dtor, even if it
  33. >: is pure.
  34.  
  35. Never really thought about pure virtual dtors before... beacause I
  36. always implement all dtors... even if they are empty... lets others
  37. know that at least you know dtors exist and that you have considered
  38. it for the class in question.
  39.  
  40. >Another non-orthogonal, non-intuitive C++ ism.  Oh well.
  41. >
  42. >Elliott
  43.  
  44.